package com.n9.qq.android.firendlist;

import com.qq.taf.jce.JceInputStream;
import com.qq.taf.jce.JceOutputStream;
import com.qq.taf.jce.JceStruct;

import java.util.ArrayList;

/**
 * @author ice
 * @since 2019/2/22 13:59
 */
public class GetTroopListReqV2 extends JceStruct {
    public byte bGetMSFMsgFlag = 0;
    public byte bGroupFlagExt = 0;
    public int shVersion = 0;
    public long uin = 0L;
    public byte[] vecCookies = null;
    public ArrayList vecGroupInfo = null;

    public GetTroopListReqV2() {
    }

    public GetTroopListReqV2(long var1, byte var3, byte[] var4, ArrayList var5, byte var6, int var7) {
        this.uin = var1;
        this.bGetMSFMsgFlag = var3;
        this.vecCookies = var4;
        this.vecGroupInfo = var5;
        this.bGroupFlagExt = var6;
        this.shVersion = var7;
    }

    @Override
    public void readFrom(JceInputStream var1) {
        this.uin = var1.read(this.uin, 0, true);
        this.bGetMSFMsgFlag = var1.read(this.bGetMSFMsgFlag, 1, false);
        if (vecCookies == null) {
            vecCookies = new byte[1];
        }
        this.vecCookies = var1.read(vecCookies, 2, false);


        if (vecGroupInfo == null) {
            stTroopNum var2 = new stTroopNum();
            vecGroupInfo.add(var2);
        }
        this.vecGroupInfo = (ArrayList)var1.read(vecGroupInfo, 3, false);
        this.bGroupFlagExt = var1.read(this.bGroupFlagExt, 4, false);
        this.shVersion = var1.read(this.shVersion, 5, false);
    }

    @Override
    public void writeTo(JceOutputStream var1) {
        var1.write(this.uin, 0);
        var1.write(this.bGetMSFMsgFlag, 1);
        if (this.vecCookies != null) {
            var1.write(this.vecCookies, 2);
        }
        if (this.vecGroupInfo != null) {
            var1.write(this.vecGroupInfo, 3);
        }
        var1.write(this.bGroupFlagExt, 4);
        var1.write(this.shVersion, 5);
    }
}
